package com.wjv.example.springboot.base.controller;

import com.wjv.example.common.ResultInfo;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>Title: HomeController</p>
 *
 * @author wjv
 * @since 2021/7/30 13:40
 */
@RestController
@RequestMapping("/home")
public class HomeController {

    @GetMapping("/index")
    public ResultInfo index(String keyword, String name) {
        return ResultInfo.success(keyword, name);
    }

    @PostMapping("/add")
    public ResultInfo add(@RequestBody Map<String, Object> map) {
        return ResultInfo.success(map);
    }
}
